<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="cont">
        
    </div>
    <script>
        // 获取元素
        let wenzi = "基材奢想在梦中雷鸣的撒恢复了卡萨活佛立刻撒旦弗利萨看到回复绿卡的撒回复四川路桥茬卢萨卡好伐啦李春雷横跨赴拉萨扩大分,基材奢想在梦中雷鸣的撒恢复了卡萨活佛立刻撒旦弗利萨看到回复绿卡的撒回复四川路桥茬卢萨卡好伐啦李春雷横跨赴拉萨扩大分基材奢想在梦中雷鸣的撒恢复了卡萨活佛立刻撒旦弗利萨看到回复绿卡的撒回复四川路桥茬卢萨卡好伐啦李春雷横跨赴拉萨扩大分";
        //分割成数组
        let arr = wenzi.split("");
        let cont = document.querySelector('.cont');
        function wzspan(){
            if(arr.length>0){
                let wz = arr.shift();
                //创建span
                let span = document.createElement("span");
                span.innerHTML = wz;
                cont.appendChild(span);
            }else{
                clearInterval(timer);
                return
            }
        }
        timer = setInterval(()=>{
            wzspan();
        },200)
    </script>
</body>
</html>